package org.leslie.controller;

import org.leslie.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmailController {

    @Autowired
    private EmailService emailService;

    @RequestMapping("/send")
    public Boolean send(){
        String to = "leslie43@sina.com";
        String title = "Test Email";
        String content = "This is a test email";
        return emailService.send(to, title, content);
    }
}
